package com.lglbc;

import com.lglbc.hello.Hello;
import com.lglbc.hello.HelloAPIGrpc;
import io.grpc.stub.StreamObserver;

public class HelloServiceIpl extends HelloAPIGrpc.HelloAPIImplBase {
    @Override
    public void sayHello(Hello.HelloRequest request, StreamObserver<Hello.HelloReply> responseObserver) {
        String greeting = "Hello, " + request.getName();
        Hello.HelloReply reply = Hello.HelloReply.newBuilder().setMessage(greeting).build();
        responseObserver.onNext(reply);
        responseObserver.onCompleted();
    }
}
